package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo2 {
    public static void main(String[] args) throws IOException {
        System.out.println("程序开始了");
        FileOutputStream fos = null;
        try{
            fos = new FileOutputStream("/a/c/v/dat.txt");
        }catch (IOException e){
            System.out.println("出现问题了");
        }finally {
            try{
                fos.close();
            }catch (Exception e){
                System.out.println("异常全部解决了");
            }

        }

        System.out.println("结束了");
    }
}
